import request from '@/utils/request'
import Qs from 'qs'
// 删除分类
export function delCategory(userId) {
  return request({
    url: '/sks/catalog/' + userId,
    method: 'delete'
  })
}


//修改分类
export function reviseCategory(params) {
   console.log(params);
  return request({
    url: '/sks/catalog',
    method:'put',
    data:params
  })
}

//新增分类
export function enewCategory(params) {
  return request({
    url: '/sks/catalog',
    method: 'post',
    data:params,
  })
}

//根据Id获取分类详情
export function details(deptId) {
  return request({
    url: '/sks/catalog/' + deptId,
    method: 'get'
  })
}

//获取产品目录列表
export function catalogList(query) {
  return request({
    url: '/sks/catalog/list',
    method: 'get',
    params: query
  })
}
